package com.leanyuan.main.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leanyuan.main.domain.House;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 相亲相爱一家人
 * @since 2021-05-25
 */
@Repository
public interface HouseMapper_M extends BaseMapper<House> {
    @Results(id = "HouseMap", value = {
            @Result(column = "HOUSE_ID", property = "houseId"),
            @Result(column = "H_MEMBER", property = "hMember"),
            @Result(column = "H_AREA", property = "hArea"),
            @Result(column = "H_CIRS", property = "hCirs"),
            @Result(column = "H_CONDITION", property = "hCondition"),
            @Result(column = "BUILDING_ID", property = "buildingId"),
            @Result(column = "USER_ID", property = "userId"),
            @Result(column = "HOUSECONDITION", property = "housecondition"),
            @Result(column = "HOUSEADDTIME", property = "houseaddtime")
    })
    @Select("select * from house where building_id=#{buildingId}")
    public List<House> findBuild(Integer buildingId);
}
